import React, {Component} from "react";
import {HashRouter, Switch, Route, Redirect} from 'react-router-dom';

import App from '../views/App'
import Login from '../views/login';
import Register from '../views/rigister';

export default class RouteConfig extends Component {
  render() {
    return (
      <HashRouter>
        <App>
          <Switch>
            <Route path="/" exact component={Login}/>
            <Route path="/login" component={Login}/>
            <Route path="/register" component={Register}/>
            <Redirect to={{pathname: '/'}}/>
          </Switch>
        </App>
      </HashRouter>
    )
  }
}
